<template>
    <el-card>
        <div class="header">
            <span>线上热门搜索</span>
            <!-- 下拉菜单 -->
            <el-dropdown>
                <span class="el-dropdown-link">
                    <i class="el-icon-more"></i>
                </span>
                <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item>黄金糕</el-dropdown-item>
                    <el-dropdown-item>狮子头</el-dropdown-item>
                    <el-dropdown-item>螺蛳粉</el-dropdown-item>
                    <el-dropdown-item>双皮奶</el-dropdown-item>
                    <el-dropdown-item>蚵仔煎</el-dropdown-item>
                </el-dropdown-menu>
            </el-dropdown>
        </div>
        <div class="content">
            <el-row :gutter="10">
                <el-col :span="12">
                    <searchDetail title="搜索用户数">
                        <template slot="content">
                            <span class="count">12321</span>
                            <span>17.1</span>
                            <i class="el-icon-caret-bottom"></i>
                        </template>
                    </searchDetail>
                </el-col>
                <el-col :span="12">
                    <searchDetail title="人均搜索次数">
                        <template slot="content">
                            <span class="count">2.7</span>
                            <span>26.2</span>
                            <i class="el-icon-caret-top"></i>
                        </template>
                    </searchDetail>
                </el-col>
            </el-row>
        </div>
        <el-table :data="tableData" border stripe empty-text="暂无数据">
            <el-table-column label="排名" type="index" width="80px" align="center">
            </el-table-column>
            <el-table-column label="搜索关键字" prop="prop" width="width" align="center">
            </el-table-column>
            <el-table-column label="用户数" sortable prop="prop" width="width" align="center">
            </el-table-column>
            <el-table-column label="周涨幅" sortable prop="prop" width="width" align="center">
            </el-table-column>
        </el-table>
        <el-pagination style="text-align: right; margin-top: 20px;" layout="prev, pager, next" :total="1000">
        </el-pagination>
    </el-card>
</template>
<script>
    import searchDetail from './searchDetail/index'
    export default {
        name: 'Search',
        components: {
            searchDetail
        },
        data() {
            return {
                tableData: [{}], // 表格的数据
            }
        },
    }
</script>
<style scoped>
    .header {
        display: flex;
        justify-content: space-between;
        font-size: 18px;
        border-bottom: 1px solid #eee;
        height: 40px;
    }

    .content {
        margin-bottom: 30px;
    }

    .el-dropdown-link {
        cursor: pointer;
    }
</style>